package com.meiyou.utils;

import javax.servlet.http.HttpServletRequest;

public class LoginSession {
	/**
	 * 判断管理员是否登录
	 */
	public static boolean managerLogin(HttpServletRequest req) {
		if (req.getSession().getAttribute("manager") != null) {
			return true;
		} else {
			return false;
		}
	}
	
	
	/**
	 * 判断用户是否登录
	 */
	public static boolean userLogin(HttpServletRequest req) {
		if(req.getSession().getAttribute("user")!=null) {
			return true;
		}
		return false;
	}
}
